﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Community.CsharpSqlite
{
    class ExtendedResultCode
    {

        /*
    ** CAPI3REF: Extended Result Codes
    ** KEYWORDS: {extended error code} {extended error codes}
    ** KEYWORDS: {extended result code} {extended result codes}
    **
    ** In its default configuration, SQLite API routines return one of 26 integer
    ** [StatusCode.SQLITE_OK | result codes].  However, experience has shown that many of
    ** these result codes are too coarse-grained.  They do not provide as
    ** much information about problems as programmers might like.  In an effort to
    ** address this, newer versions of SQLite (version 3.3.8 and later) include
    ** support for additional result codes that provide more detailed information
    ** about errors. The extended result codes are enabled or disabled
    ** on a per database connection basis using the
    ** [sqlite3_extended_result_codes()] API.
    **
    ** Some of the available extended result codes are listed here.
    ** One may expect the number of extended result codes will be expand
    ** over time.  Software that uses extended result codes should expect
    ** to see new result codes in future releases of SQLite.
    **
    ** The StatusCode.SQLITE_OK result code will never be extended.  It will always
    ** be exactly zero.
    */
        //#define SQLITE_IOERR_READ              (StatusCode.SQLITE_IOERR | (1<<8))
        //#define SQLITE_IOERR_SHORT_READ        (StatusCode.SQLITE_IOERR | (2<<8))
        //#define SQLITE_IOERR_WRITE             (StatusCode.SQLITE_IOERR | (3<<8))
        //#define SQLITE_IOERR_FSYNC             (StatusCode.SQLITE_IOERR | (4<<8))
        //#define SQLITE_IOERR_DIR_FSYNC         (StatusCode.SQLITE_IOERR | (5<<8))
        //#define SQLITE_IOERR_TRUNCATE          (StatusCode.SQLITE_IOERR | (6<<8))
        //#define SQLITE_IOERR_FSTAT             (StatusCode.SQLITE_IOERR | (7<<8))
        //#define SQLITE_IOERR_UNLOCK            (StatusCode.SQLITE_IOERR | (8<<8))
        //#define SQLITE_IOERR_RDLOCK            (StatusCode.SQLITE_IOERR | (9<<8))
        //#define SQLITE_IOERR_DELETE            (StatusCode.SQLITE_IOERR | (10<<8))
        //#define SQLITE_IOERR_BLOCKED           (StatusCode.SQLITE_IOERR | (11<<8))
        //#define SQLITE_IOERR_NOMEM             (StatusCode.SQLITE_IOERR | (12<<8))
        //#define SQLITE_IOERR_ACCESS            (StatusCode.SQLITE_IOERR | (13<<8))
        //#define SQLITE_IOERR_CHECKRESERVEDLOCK (StatusCode.SQLITE_IOERR | (14<<8))
        //#define SQLITE_IOERR_LOCK              (StatusCode.SQLITE_IOERR | (15<<8))
        //#define SQLITE_IOERR_CLOSE             (StatusCode.SQLITE_IOERR | (16<<8))
        //#define SQLITE_IOERR_DIR_CLOSE         (StatusCode.SQLITE_IOERR | (17<<8))
        //#define SQLITE_LOCKED_SHAREDCACHE      (StatusCode.SQLITE_LOCKED | (1<<8) )
        public const int SQLITE_IOERR_READ = (StatusCode.SQLITE_IOERR | (1 << 8));
        public const int SQLITE_IOERR_SHORT_READ = (StatusCode.SQLITE_IOERR | (2 << 8));
        public const int SQLITE_IOERR_WRITE = (StatusCode.SQLITE_IOERR | (3 << 8));
        public const int SQLITE_IOERR_FSYNC = (StatusCode.SQLITE_IOERR | (4 << 8));
        public const int SQLITE_IOERR_DIR_FSYNC = (StatusCode.SQLITE_IOERR | (5 << 8));
        public const int SQLITE_IOERR_TRUNCATE = (StatusCode.SQLITE_IOERR | (6 << 8));
        public const int SQLITE_IOERR_FSTAT = (StatusCode.SQLITE_IOERR | (7 << 8));
        public const int SQLITE_IOERR_UNLOCK = (StatusCode.SQLITE_IOERR | (8 << 8));
        public const int SQLITE_IOERR_RDLOCK = (StatusCode.SQLITE_IOERR | (9 << 8));
        public const int SQLITE_IOERR_DELETE = (StatusCode.SQLITE_IOERR | (10 << 8));
        public const int SQLITE_IOERR_BLOCKED = (StatusCode.SQLITE_IOERR | (11 << 8));
        public const int SQLITE_IOERR_NOMEM = (StatusCode.SQLITE_IOERR | (12 << 8));
        public const int SQLITE_IOERR_ACCESS = (StatusCode.SQLITE_IOERR | (13 << 8));
        public const int SQLITE_IOERR_CHECKRESERVEDLOCK = (StatusCode.SQLITE_IOERR | (14 << 8));
        public const int SQLITE_IOERR_LOCK = (StatusCode.SQLITE_IOERR | (15 << 8));
        public const int SQLITE_IOERR_CLOSE = (StatusCode.SQLITE_IOERR | (16 << 8));
        public const int SQLITE_IOERR_DIR_CLOSE = (StatusCode.SQLITE_IOERR | (17 << 8));
        public const int SQLITE_LOCKED_SHAREDCACHE = (StatusCode.SQLITE_LOCKED | (1 << 8));

    }
}
